const { VantResolver } = require('unplugin-vue-components/resolvers');
const ComponentsPlugin = require('unplugin-vue-components/webpack');

module.exports = {

    //不检测
    lintOnSave: false,
    css: {

        loaderOptions: {

            postcss: {

                plugins: [

                    require('postcss-pxtorem')({ rootValue: 37.5, propList: ['*'] }),

                ],

            },

        },

    },

    // 配置按需引用,作用：则不需要去main.js去配置了，也就是不需要引入和use
    configureWebpack: {
        plugins: [
            ComponentsPlugin({
                resolvers: [VantResolver()],
            }),
        ],
    },

};